Optical sensors for various mechanical quantities have the obvious advantage of being insensitive to electrical interference. Strain sensors or gauges based on optical components and in particular on different kinds of optical fibers are thus suitable for measurements in the most varying environments. Also secondary mechanical quantities such as pressure, temperature, fill level and similar quantities can be measured by means of such sensors. For a strain sensor comprising a suitably designed optical fiber, further the signal can be transferred from the place of measurement to a monitoring unit through a portion of the optical fiber itself, what gives a smaller sensitivity to interference compared to electrical signal transmission.